package com.zhanghe.study.design_pattern.decorator_pattern;

/**
 * 装饰器模式
 * @author zh
 * @date 2022/10/21 10:35
 */
public class Main {
    public static void main(String[] args) {
        Component component = new ConcreteComponent();

        Component componentA = new ConcreteDecoratorA(component);

        Component componentB = new ConcreteDecoratorB(componentA);

        componentB.operation();
    }
}
